#!/usr/bin/python
# coding : UTF-8

num=0;

for i in range(1,5):
    for j in range(1,5):
        for n in range(1,5):
            if (i != j) and (j != n) and (i != n) :
                print i,j,n
                num += 1
               
print "num=",num
